//
// Created by Yun on 2025/2/25.
//

#include "user_dev_declare.h"

Dev_Led_Cfg_TypeDef stDev_Red_Led = {
        .u8ActState  = LOW_LEVEL,
};

Dev_Led_Cfg_TypeDef stDev_Blue_Led = {
        .u8ActState  = LOW_LEVEL,
};

Dev_Button_Cfg_TypeDef stDev_Button1 = {
        .u8ActState  = HIGH_LEVEL,
};

Dev_Button_Cfg_TypeDef stDev_Button2 = {
        .u8ActState  = LOW_LEVEL,
};

Dev_Button_Cfg_TypeDef stDev_Button3 = {
        .u8ActState  = LOW_LEVEL,
};

Dev_W25Q_Cfg_TypeDef stDev_W25Q128 = {
        .u32FlashSize = 16*1024*1024,
};


static uint8_t u8RxData[128];
static uint8_t u8TxData[128];

Dev_Uart_Cfg_TypeDef stDev_Uart1 = {
        .pu8RxBuffer = u8RxData,
        .u16RxBufSize = 128,
        .pu8TxBuffer = u8TxData,
        .u16TxBufSize = 128,
        .u16Timeout = 200,
};

Dev_Tim_Cfg_TypeDef stDev_Tim6 = {
        .u8Timeout = 1,
};

Dev_Tim_Cfg_TypeDef stDev_Tim6_5 = {
        .u8Timeout = 10,
};

uint8_t u8OLedInitCmd[]={
        0xAE, 0x00, 0x10, 0x40, 0xB0, 0x81, 0xFF, 0xA1, 0xA6, 0xA8, 0x3F,
        0xC8, 0xD3, 0x00, 0xD5, 0x80, 0xD8, 0x05, 0xD9, 0xF1, 0xDA,
        0x12, 0xD8, 0x30, 0x8D, 0x14, 0xAF};

Dev_OLed_4p_Cfg_TypeDef stDev_OLed_4p = {
        .pu8InitCmd = u8OLedInitCmd,
        .u16InitCmdLen = sizeof(u8OLedInitCmd),
        .u16DevAddr = 0x78,
        .u8CmdMem = 0x00,
        .u8DataMem = 0x40,
        .u16TimeOut = 200,
};

TSOS_CONTROL(stTSOSController);
